import requests


class LoginApi(object):
    url = "http://ihrm2-test.itheima.net/api/sys/login"

    @classmethod
    def login(cls, body):
        resp = requests.post(cls.url, json=body)
        return resp


if __name__ == '__main__':
    resp = LoginApi.login({"mobile": "13800000002", "password": "123456"})
    print(resp.json())
    print(resp.status_code)
